package jp.co.neosystem.s2wg.service.dao;

import jp.co.neosystem.s2wg.entity.TblMstDepartment;

import org.seasar.extension.jdbc.service.S2AbstractService;

/**
 * TblMstDepartment用DAOサービスクラス。
 */
public class DepartmentService extends S2AbstractService<TblMstDepartment> {
	/**
	 * 部課名を取得します。
	 * 
	 * @param departmentId
	 *            部課ID
	 * @return 部課名
	 */
	public String getDepartmentName(final String departmentId) {
		final TblMstDepartment d = jdbcManager.from(TblMstDepartment.class)
				.where("departmentId=?", departmentId).getSingleResult();
		return (d != null) ? d.departmentName : "";
	}
}
